package com.example.comic.mvp.model

import android.support.design.widget.Snackbar
import android.view.View

import okhttp3.Request

fun getJsonString(url: String): String {
    val okClient = OkClient.instance()
    val request = Request.Builder().url(url).build()
    val response = okClient.newCall(request).execute()
    return response.body()!!.string()
}
fun View.snackbar(messageRes: Int, duration: Int = Snackbar.LENGTH_SHORT) {
    Snackbar.make(this, messageRes, duration).show()
}
